"""

"""
from configparser import ConfigParser

class Config(ConfigParser):
    def __init__(self,conf_file):
        super().__init__()
        self.read(conf_file,'utf-8')
#创建对象来调用类，在其他的文件可以直接使用---对象名
conf=Config(R'D:\learn\day16\conf.ini')




#
if __name__ == '__main__':
    # from configparser import ConfigParser
    # conf=ConfigParser()
    # conf.read(r'D:\learn\day16\conf.ini')
    #
    # conf.read(r'D:\learn\day16\conf.ini', encoding='utf-8')

    #conf=Config(R'D:\learn\day16\conf.ini')
    name = conf.get('logging', 'name')
    level = conf.get('logging', 'level')
    sfh_level = conf.get('logging', 'fh_level')
    sh_level = conf.get('logging', 'sh_level')

    print(level)